<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class c_changepassword extends CI_Controller {

	function __construct(){
		parent::__construct();	
		checkLogin();
		$this->load->model('m_changepassword');
	}
	
	function index(){
		$task = $this->input->post("task");
		switch($task){
			case 'UBAH_PASSWORD' : 
				$this->ubah_password(); 
				break;
			default : 
			$this->load->view('v_changepassword',null);
		}
	}
	
	function ubah_password(){
		$data = array(
			"user_passwd" => md5($this->input->post("password"))
		);
		$this->m_changepassword->ubah_password($data);
	}
}